//
//  BaseViewController.m
//  BaseProject
//
//  Created by 陈家将 on 16/9/21.
//  Copyright © 2016年 szteyou. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self baseInit];
    
    [IQKeyboardManager sharedManager].enableAutoToolbar = NO;
    DBLog(@"--->ENTER: %@", [self class]);
}

- (void)dealloc {
    DBLog(@"--->EXIT: %@ Dealloc", [self class]);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (void)baseInit {
    self.navigationController.title = NSStringFromClass([self class]);
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.translucent = NO;
}


#pragma mark - **** publish method ****

- (BOOL)checkIsLoginSuccess:(LoginSuccessCallBack)success Cancel:(LoginCancelCallBack)cancel {
    
    if (![KMUserInfoManager isLogin]){
        [self presentLoginVCSuccess:success Cancel:cancel];
        return NO;
    }else {
        return YES;
    }
}

- (void)presentLoginVCSuccess:(LoginSuccessCallBack)success Cancel:(LoginCancelCallBack)cancel {
    
//    LoginViewController *loginVc = [[LoginViewController alloc] init];
//    [KEY_WINDOW.rootViewController presentViewController:loginVc animated:YES completion:nil];
}


@end
